package net.cyndeline.xml.actionParsers

import net.cyndeline.xml.ItemParser
import scala.xml.Elem
import net.cyndeline.entitySystem.Event
import net.cyndeline.itemEventFactory.ItemActivation
import net.cyndeline.itemEventFactory.actions.defaultImpl.StealAction
import com.escalatesoft.subcut.inject.BindingModule
import com.escalatesoft.subcut.inject.Injectable
import net.cyndeline.itemEventFactory.actions.defaultImpl.Steal
import net.cyndeline.itemEventFactory.Action
import net.cyndeline.xml.ActionParser
import net.cyndeline.xml.AmountParser
import net.cyndeline.xml.Amount
import scala.xml.Node

/**
 * Parses a <steal> XML tag and generates template events based on its content.
 */
class StealParser(implicit val bindingModule: BindingModule) extends ActionParser with Injectable {
  
  override def parse(xml: Node): Action = {
    val action = injectOptional[StealAction] getOrElse new Steal()
    action
  }
}